using WeatherMcpServer.Data.Entities;

namespace WeatherMcpServer.Data.Repositories;

/// <summary>
/// 仓储接口：预警记录。
/// </summary>
public interface IWeatherAlertRepository
{
    Task<WeatherAlert> AddAsync(WeatherAlert alert, CancellationToken ct = default);
    Task<WeatherAlert?> GetByIdAsync(long id, CancellationToken ct = default);
    Task<IReadOnlyList<WeatherAlert>> QueryAsync(
        WeatherType? type = null,
        AlertStatus? status = null,
        string? regionCode = null,
        DateTime? fromUtc = null,
        DateTime? toUtc = null,
        int skip = 0,
        int take = 50,
        CancellationToken ct = default);
    Task<int> SaveChangesAsync(CancellationToken ct = default);
}
